/*
 *  Utility.h
 *  SoundController0002
 *
 *  Created by jiro on 10/07/01.
 *  Copyright 2010 jiro music. All rights reserved.
 *
 */

#pragma once

#include <vector>

namespace sc 
{

	class Utility
	{

	public:
		template< class T1, class T2 >
		static void CopyByStaticCast( const std::vector< T1 >& source, std::vector< T2 >& destination )
		{
			size_t count = source.size();
			destination.clear();
			destination.resize( count );

			#pragma omp parallel for
			for ( int i = 0; i < count; i++ )
			{
				destination[ i ] = static_cast< T2 >( source[ i ] );
			}
		}
	};
}